﻿<UserControl x:Class="Fluffy.Text.TextDocumentView"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             xmlns:avalonEdit="http://icsharpcode.net/sharpdevelop/avalonedit"
             xmlns:text="clr-namespace:Fluffy.Text"
             xmlns:behaviors="clr-namespace:Fluffy.Text.Behaviors"
             xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity"
             mc:Ignorable="d" d:DataContext="{d:DesignInstance text:TextDocumentViewModel}"
             d:DesignHeight="300" d:DesignWidth="300">
    <Grid>
        <avalonEdit:TextEditor FontFamily="Consolas" FontSize="10pt" HorizontalScrollBarVisibility="Auto" VerticalScrollBarVisibility="Auto" SyntaxHighlighting="{Binding HighlightingStyle}">
            <avalonEdit:TextEditor.ContextMenu>
                <ContextMenu>
                    <MenuItem Header="Cut" Command="{Binding CutCommand}"/>
                    <MenuItem Header="Copy" Command="{Binding CopyCommand}"/>
                    <MenuItem Header="Paste" Command="{Binding PasteCommand}"/>
                </ContextMenu>
            </avalonEdit:TextEditor.ContextMenu>
            <i:Interaction.Behaviors>
                <behaviors:TextEditorInitializedBehavior ViewModel="{Binding}"/>
            </i:Interaction.Behaviors>
        </avalonEdit:TextEditor>
    </Grid>
</UserControl>
